#include<stdio.h>
#include<assert.h>

char* my_strncat(char* p1,char* p2,int n)
{
	assert(p1&&p1);
	char *ret=p1;
	while(*p1)
		p1++;
	while((n--)&&(*p1++=*p2++));
	return p1;
}

int main()
{
	char arr1[20]="hello ";
	char arr2[]="world";
	my_strncat(arr1,arr2,3);
	printf("%s",arr1);
	return 0;
}
